<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>栏目概况</title>
	<%@ include file="/common/meta.jsp"%>
	<%@ include file="/common/common.jsp"%>
</head>
<body>
<div id="wrapper">
<div id="main_box">
	<div class="curmb"><s:text name="your.site.position"/>:<a href="${ctx}/main.action"><s:text name="homepage"/></a><span>></span>栏目概况</div>
	<s:form action="content-list" id="search_form">
	<s:hidden name="content.category.categoryId"  id='content_categoryId'/>
	<div class="listbox" id="listbox">
		<table class="listgrid" id="listbox">
			<tbody>
				<tr>			
					<th>栏目名称</th>
					<th>文章总数</th>
					<th>栏目状态</th>
					<th>待审核文章数</th>
					<th>已发布文章数</th>
					<th><s:text name="operate"/></th>
				</tr>
				<s:iterator value="cbList">
				<s:if test=""></s:if>
					<tr>						
					<td><s:property value="catName"/>&nbsp;</td>
					<td><s:property value="contentCount"/>&nbsp;</td>
					<td>
					   <s:if test="categoryStatus == true"><s:text name="yetEnable"/></s:if><s:else><span id="categoryStatus_meg" style="color:red;"><s:text name="yetDisable"/></span></s:else>&nbsp;
					</td>
					<td><s:property value="auditContentCount"/>&nbsp;</td>
					<td><s:property value="publishContentCount"/>&nbsp;</td>
						<td>
							<a href="#this" onclick="goContent('<s:property value="categoryId"/>')">进入</a><tt>|</tt>
						    <s:if test="%{authLicence('3_3_5',categoryId)}"><a href="#this">栏目预览</a><tt>|</tt><a href="#this">发布</a></s:if>
						    <s:else><a >栏目预览</a><tt>|</tt><a >发布</a></s:else> 						    
						</td>
					</tr>
				</s:iterator>
			</tbody>
		</table>
		</s:form>
	</div>
</div>
</div>
</body>
</html>
<script type="text/javascript" defer="defer">
	function goContent(id){
		document.location.href="${ctx}/content/content-list.action?content.category.categoryId="+id;
	}
	//function goNnter2(){
	//	var catId =$("#search_form_content_category_categoryId").val();
	//	if (window.navigator.userAgent.indexOf("Chrome")>=0){
	//		window.parent.frames["leftframe"].frames["leftmenutree"].contentWindow.synchronous(catId,0);
	//	}
	//	else{
	//		window.parent.frames["leftframe"].frames["leftmenutree"].synchronous(catId,0);
	//	}
	//}
	//进入子栏目管理页面
	function goNnter2(){
		var id = $("#content_categoryId").val();
		if (window.navigator.userAgent.indexOf("Chrome")>=0){
			window.parent.frames["leftframe"].contentWindow.expandTarget("ztree_content",id);
		}
		else{
			window.parent.frames["leftframe"].expandTarget("ztree_content",id);
		}
	}
	function goNnter(categoryId){
		$("${ctx}/category/category-list.action?category.categoryId="+categoryId,function(data){
			if(data.length>0){
				document.location.href="${ctx}/category/category-list.action?category.categoryId="+categoryId;
			}else{
				alert("该栏目没有子栏目");
			}
		});
	}
	function synchronous(categoryId){
		/* if (categoryId){
			var now_onclick=$(window.parent.frames["leftframe"].frames["leftmenutree2"].document).find(".dojoTreeNodeLabelSelected").parent("span").parent(".dojoTreeNode");
			var now_child=now_onclick.children("div").children(".dojoTreeNode");
			var temp;
			for(var i=0;i<now_child.length;i++){
				temp=now_child.eq(i).children("span").children("span").children("a").attr("href").replace("category-list.action?category.categoryId=","");
				if (temp==categoryId){break;}
			}
			if (now_child.eq(i).children("div").css("display")=="none"){
				now_child.eq(i).children("img").eq(now_child.eq(i).children("img").length-1).click();
			}
		}
		else {
			
		} */
	}
$(function(){
		goNnter2();
		if ($.browser.msie && ($.browser.version == "6.0") && !$.support.style) {
			$('#main_box').width($('#main_box').width()-25);
		}
})
</script>